home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-19 | 2.5 KB | 82 lines | [TEXT/KAHL] |
- /*
- Scare your friends. Make new enemies.
-
- AppleMenuDistortion lets you distort the size of the icons in the Apple Menu to
- just about any size you want. Tall and thin, wide and narrow, the size of the
- screen, etc.
-
- The effect can be installed into a single application. When that app is run, it's
- Apple Menu icons will be weird. You control just how weird, which effects just how
- upset unsuspecting friend/coworkers may become.
-
- To effect all applications, install into the System file.
-
- To relieve any ensuing angst among the victims, just use the Remove button.
-
-
- This isn't really a hack, it's to absurdly easy to create But it -looks- like something
- very sick is happening, so that counts for something. It depends on
- a the System 7 menubar defproc, which for some reason tries to locate a
- color icon with ID 256. If it finds such an icon, it uses the icon's bounds
- rect to scale the Apple Menu icons.
-
- The purpose for this, and whether it is intentional or just a side effect, is
- unknown to me. When I stumped the panel of experts with this question (hey,
- where's my Stump shirt?) someone on the panel suggested that the icon was
- meant "to anti-alias the Apple icon". Since the panel is well known for jiving
- when at a total loss, I doubt this. Besides, do you see any anti-aliasing?
-
-
- I wrote this at MacHack '92, at about 4:30 AM, sitting in the audience after the hack.
- demonstration was well under way. Distribute freely....
-
- ©1992 Bill Monk/MonkWorks
-
- Bill Monk
- CIS: 72511,301
- AppleLink MONK
- internet: 72511.301@compuserve.com
-
- */
-
- /* This just demonstrates the technique. Plug it into your own dialog.
- Provide your own 'cicn' ID 256, too. I'm too tired after staying up all night.
- */
- munge_icon( void )
- {
- short eCode = noErr,
- saveResFile,
- right,
- bottom;
- Str255 string;
- long width,
- height;
-
-
- /* get size factors out of the dialog - use your own routines here, this is
- just an example.
-
- get_dialog_text( theDialog, rightItem, string );
- StringToNum( string, &right );
-
- get_dialog_text( theDialog, bottomItem, string );
- StringToNum( string, &bottom );
- */
-
- iconH = (CIconHandle)GetResource( 'cicn', 256 );
- if( !ResError() && iconH != nil )
- {
-
- right = (**iconH).iconPMap.bounds.left + width;
- bottom = (**iconH).iconPMap.bounds.top + height;
-
- (**iconH).iconPMap.bounds.right = right;
- (**iconH).iconPMap.bounds.bottom = bottom;
-
- // Now: look at the Apple Menu. The icons look more interesting now.
- // Save the munged resource if you wish...
-
- }
-
-
- } /* end */